require(['./config'],()=>{
    require(['template','header','footer'],(template,header,footer)=>{
        class List{
            constructor (){
                this.init()
                this.getGift()
            }
            init(){

            }
            getGift(){
                $.get('http://rap2api.taobao.org/app/mock/245004/shoplist',resp=>{
                console.log(resp);
                if(resp.code === 200){
                    const {list} = resp.body
                    const html = template('cateshop',{list})
                    $('#listshop').html(html)
                }
                })
            }
        }
        new List()
    })
})
